{% extends 'base.html' %}
{% load staticfiles %}
{% block css %}
    <link href="{% static 'plugins/datetimepicker/css/bootstrap-datetimepicker.min.css' %}" rel="stylesheet"
          media="screen">
{% endblock %}
{% block js %}
    <script type="text/javascript"
            src="{% static 'plugins/datetimepicker/js/bootstrap-datetimepicker.min.js' %}"></script>
    <script>
        $(function () {
            $('.form_datetime').datetimepicker({
                showMeridian: true,
                autoclose: true,
                todayBtn: true,
                pickerPosition: 'bottom-left'
            });
        })
    </script>
{% endblock %}
{% block content %}
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                用户管理
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
                <li class="active">{{ action|default:'新增' }}</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">{{ action|default:'新增' }}用户</h3>
                    <div class="box-tools pull-right">
                        <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div><!-- /.box-tools -->
                </div><!-- /.box-header -->
                <div class="box-body">
                    {% if errors %}
                        <div class="alert alert-danger">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <h4><i class="icon fa fa-ban"></i> 错误</h4>
                            {% for error in errors.values %}
                                {{ error }}
                            {% endfor %}
                        </div>
                    {% endif %}
                    <form id="parkingform" method="POST" class="form-horizontal">
                        {% csrf_token %}
                        <div class="form-group">
                            <label for="subtext" class="col-sm-5 control-label">用户车牌<span
                                    style="color: red;">*</span></label>
                            <div class="col-sm-3">
                                {{ userform.car_number }}
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="subtext" class="col-sm-5 control-label">是否VIP</label>
                            <div class="col-sm-3">
                                {{ userform.vip }}
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="subtext" class="col-sm-5 control-label">用户姓名<span
                                    style="color: red;">*</span></label>
                            <div class="col-sm-3 ">
                                {{ userform.name }}
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="subtext" class="col-sm-5 control-label">用户手机号<span style="color: red;">*</span></label>
                            <div class="col-sm-3">
                                {{ userform.phone }}
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="subtext" class="col-sm-5 control-label">用户地址</label>
                            <div class="col-sm-4">
                                {{ userform.address }}
                            </div>
                        </div>
{#                        <div class="form-group">#}
{#                            <label for="subtext" class="col-sm-5 control-label">到期时间<span#}
{#                                    style="color: red;">*</span></label>#}
{#                            <div class="input-group date form_datetime col-sm-3 pl15">#}
{#                                {{ userform.expire_at }}#}
{#                                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>#}
{#                            </div>#}
{#                        </div>#}
                        <div class="form-group">
                            <div class="col-md-offset-5 col-md-9">
                                <button type="submit" id="published" class="btn btn-primary"><i class="fa fa-save"></i>
                                    保存
                                </button>
                                <button type="reset" class="btn btn-primary "><i class="fa fa-undo"></i> 重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </section>
        <!-- /.content -->
    </div>


{% endblock %}
